package com.zzedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzedu.domain.ZzAppDeviceLogin;
import com.zzedu.dto.ZzAppDeviceLoginDTO;
import com.zzedu.mapper.ZzAppDeviceLoginMapper;
import com.zzedu.service.IZzAppDeviceLoginService;
import org.springframework.stereotype.Service;
/**
 * (教育-学校)设备登录信息Service业务层处理
 * 
 * @author Mr.Wang
 * @date 2025-06-02
 */
@Service
public class ZzAppDeviceLoginServiceImpl extends ServiceImpl<ZzAppDeviceLoginMapper,ZzAppDeviceLogin> implements IZzAppDeviceLoginService
{

    @Override
    public LambdaQueryWrapper<ZzAppDeviceLogin> buildQuery(ZzAppDeviceLoginDTO zzAppDeviceLogin) {
        LambdaQueryWrapper<ZzAppDeviceLogin> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(null!=zzAppDeviceLogin.getDeviceId(), ZzAppDeviceLogin::getDeviceId, zzAppDeviceLogin.getDeviceId());
        lambdaQueryWrapper.eq(null!=zzAppDeviceLogin.getGmtCreate(), ZzAppDeviceLogin::getGmtCreate, zzAppDeviceLogin.getGmtCreate());
        lambdaQueryWrapper.eq(null!=zzAppDeviceLogin.getGmtModify(), ZzAppDeviceLogin::getGmtModify, zzAppDeviceLogin.getGmtModify());
        lambdaQueryWrapper.eq(null!=zzAppDeviceLogin.getDeleted(), ZzAppDeviceLogin::getDeleted, zzAppDeviceLogin.getDeleted());

        lambdaQueryWrapper.orderByDesc(ZzAppDeviceLogin::getId);
        return lambdaQueryWrapper;
    }
}